import request from "@/utils/request";

// 获取项目列表
export function getProjectListApi(query, data) {
  return request({
    url: "/system/project/list",
    method: "post",
    params: query,
    data,
  });
}

// 获取项目审核列表
export function getProjectCheckListApi(query, data) {
  return request({
    url: "/system/project/selectCheckProjectList",
    method: "post",
    params: query,
    data,
  });
}

// 新增项目信息
export function addProjectApi(data) {
  return request({
    url: "/system/project/add",
    method: "post",
    data,
  });
}

// 编辑项目信息
export function editProjectApi(data) {
  return request({
    url: "/system/project/edit",
    method: "post",
    data,
  });
}


// 编辑项目信息
export function editStatusProjectApi(data) {
  return request({
    url: "/system/project/editStatus",
    method: "post",
    data,
  });
}

// 撤销项目信息
export function revokeProjectApi(data) {
  return request({
    url: "/system/project/saveCancel",
    method: "post",
    data,
  });
}

// 获取项目详情
export function getProjectApi(projectId) {
  return request({
    url: "/system/project/getInfo",
    method: "get",
    params: { projectId },
  });
}

// 删除项目
export function deleteProjectApi(projectId) {
  return request({
    url: `/system/project/del`,
    method: "get",
    params: { projectId },
  });
}

// 提交
export function checkProjectApi(data) {
  return request({
    url: "/system/project/check",
    method: "post",
    data,
  });
}

// 提交
export function checkProjectStatusApi(data) {
  return request({
    url: "/system/project/checkProjectStatus",
    method: "post",
    data,
  });
}

// 提交
export function checkupdateProjectApi(data) {
  return request({
    url: "/system/project/updateProStatus",
    method: "post",
    data,
  });
}



// 新增跟进信息
export function addFollowApi(data) {
  return request({
    url: "/system/follow/add",
    method: "post",
    data,
  });
}

// 获取最后跟进信息
export function getEndFollowApi(projectId) {
  return request({
    url: `/system/project/getFollowLastTime`,
    method: "get",
    params: { projectId },
  });
}

// 审核进度
export function selectAuditList(deliveryApplyId,flowUuid) {
  return request({
    url: `/system/project/selectAuditList`,
    method: "get",
    params: { deliveryApplyId ,flowUuid:flowUuid || "-1"},
  });
}

// 审核进度
export function selectAuditList2(deliveryApplyId,flowUuid) {
  return request({
    url: `/system/project/selectAuditStatusList`,
    method: "get",
    params: { deliveryApplyId ,flowUuid:flowUuid || "-1"},
  });
}
